package com.example.booksales.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@ApiModel(value = " Book", description = "图书实体")
public class Book {
    public Long getBookid() {
        return bookid;
    }

    public void setBookid(Long bookid) {
        this.bookid = bookid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getPress() {
        return press;
    }

    public void setPress(String press) {
        this.press = press;
    }

    public Long getShopid() {
        return shopid;
    }

    public void setShopid(Long shopid) {
        this.shopid = shopid;
    }

    public Long getSellingPrice() {
        return sellingPrice;
    }

    public void setSellingPrice(Long sellingPrice) {
        this.sellingPrice = sellingPrice;
    }

    public Long getAmount() {
        return amount;
    }

    public void setAmount(Long amount) {
        this.amount = amount;
    }

    public String getBrief() {
        return brief;
    }

    public void setBrief(String brief) {
        this.brief = brief;
    }
    @ApiModelProperty("图书ID")
    private Long bookid;
    @ApiModelProperty("图书名称")
    @NotBlank(message = "名称不能为空")
    @Size(min = 2,max = 10,message = "名字在2-10个字符之间")
    private String title;
    @ApiModelProperty("作者")
    private String author;
    @ApiModelProperty("出版社")
    private String press;
    @ApiModelProperty("书店ID")
    private Long shopid;
    @ApiModelProperty("图书价格")
    private Long sellingPrice;
    @ApiModelProperty("图书库存数量")
    private Long amount;
    @ApiModelProperty("书本简介")
    private String brief;
}
